Today

First hour

  • About healthiar

  • healthiar function examples

  • Post-healthiar workflow

  • Outlook

  • Q & A

Break

Second hour

  • Hands-on mock case studies

  • Q & A

Why healthiar ?

healthiar is an R package (= collection of R functions) that allows you to quantify and monetize the health impacts of environmental stressors. You can use healthiar for

  • evaluation of the health impact of a policy
    • E.g. introduction of so-called “superblocks” in cities (project UPD Policy)
  • (environmental) burden of disease assessment
    • E.g. GeLuft project in Switzerland
  • health benefits of complying with guideline
    • E.g. the WHO 2021 air quality guidelines
  • monetization of health impacts
  • assessments across multiple geographic areas
  • different metrics: mortalities, YLL (life table), YLD, DALY, disease cases, …
  • Monte Carlo simulation for summary uncertainty

About healthiar

About healthiar 1/2

healthiar offers different calculation pathways and options

Figure: healthiar overview. DALY = disability-adjusted life years; YLD = years lived with disability; YLL = years of life lost

About healthiar 2/2

Selection of healthiar core family members (functions)

  • attribute_health() impacts to environmental exposure
  • compare() two scenarios
  • summarize_uncertainty() Monte Carlo simulation
  • monetize() health impacts

Example: attribute_health() with RR

Refresher - Burden of disease with relative risk

R function call

attribute_health() with RR

Goal: attribute COPD cases to air pollution exposure

results_pm_copd <-
  attribute_health(
    erf_shape = "log_linear", # Alternatives: "linear", ...
    rr_central = 1.369, 
    rr_increment = 10,  # μg / m^3
    exp_central = 8.85, # μg / m^3
    cutoff_central = 5, # μg / m^3
    bhd_central = 30747 # baseline health data: COPD incidence
  ) 

Tip

healthiar comes with some example data that start with exdat_ that allow you to test functions.

results_pm_copd <- attribute_health(
    erf_shape = "log_linear",
    rr_central = exdat_pm_copd$relative_risk, 
    rr_lower = exdat_pm_copd$relative_risk_lower,
    rr_upper = exdat_pm_copd$relative_risk_upper,
    rr_increment = 10, 
    exp_central = exdat_pm_copd$mean_concentration,
    cutoff_central = exdat_pm_copd$cut_off_value,
    bhd_central = exdat_pm_copd$incidence
  ) 

Main results

attribute outputs contain two main lists (“folders”), with sometimes sub-lists

  • health_main contains the main results

  • health_detailed contains more detailed results and other assessment details

Tip

Other healthiar functions add lists of the same structure (..._main & ..._detailed)

results_pm_copd$health_main

Go to the Environment tab in RStudio …

… and click on a variable to “open” it.

Alternatively, you can use View(results_noise_ha), which has the same effect.

impact_rounded impact pop_fraction erf_ci rr exp bhd
3502 3501.962 0.1138961 central 1.369 8.85 30747

Detailed results

If we add uncertainty in some of the input variables …

results_pm_copd <-
  attribute_health(
    erf_shape = "log_linear",
    rr_central = 1.369, 
    rr_lower = 1.114, 
    rr_upper = 1.664,
    rr_increment = 10,
    exp_central = 8.85, 
    exp_lower = 8, 
    exp_upper = 10,
    cutoff_central = 5,
    bhd_central = 30747, 
    bhd_lower = 28000, 
    bhd_upper = 32000
  ) 

… then the folder health_detailed contains all different uncertainty combinations:

results_pm_copd$health_detailed$results_raw
erf_ci exp_ci bhd_ci impact_rounded rr exp bhd
central central central 3502 1.369 8.85 30747
lower central central 1252 1.114 8.85 30747
upper central central 5474 1.664 8.85 30747
central central lower 3189 1.369 8.85 28000
lower central lower 1140 1.114 8.85 28000
upper central lower 4985 1.664 8.85 28000
central central upper 3645 1.369 8.85 32000
lower central upper 1303 1.114 8.85 32000
upper central upper 5697 1.664 8.85 32000
central lower central 2765 1.369 8.00 30747
lower lower central 980 1.114 8.00 30747
upper lower central 4356 1.664 8.00 30747
central lower lower 2518 1.369 8.00 28000
lower lower lower 892 1.114 8.00 28000
upper lower lower 3967 1.664 8.00 28000
central lower upper 2877 1.369 8.00 32000
lower lower upper 1020 1.114 8.00 32000
upper lower upper 4533 1.664 8.00 32000
central upper central 4468 1.369 10.00 30747
lower upper central 1616 1.114 10.00 30747
upper upper central 6911 1.664 10.00 30747
central upper lower 4069 1.369 10.00 28000
lower upper lower 1471 1.114 10.00 28000
upper upper lower 6294 1.664 10.00 28000
central upper upper 4651 1.369 10.00 32000
lower upper upper 1682 1.114 10.00 32000
upper upper upper 7193 1.664 10.00 32000

Example: attribute_health() with user-defined ERF

attribute_health() with user-defined ERF

A user-defined exposure-response function can be fed to the erf_eq_... arguments

  • Any function of the form intercept + a x c^1 + b x c^2 + …

  • Any other (non-linear) function of the function type, as obtained from e.g. splinefun() or approxfun()

    • E.g. MR-BRT curves from Global Burden of Disease study
results_pm_copd_mr_brt <- attribute_health(
    exp_central = 8.85,
    bhd_central = 30747,
    erf_eq_central = 
      stats::splinefun(
        x = c(0, 5, 10, 15, 20, 25, 30, 50, 70, 90, 110),
        y = c(1.00, 1.04, 1.08, 1.12, 1.16, 1.20, 1.23, 1.35, 1.45, 1.53, 1.60),
        method = "natural"),
    cutoff_central = 0
)

Main results

results_pm_copd_mr_brt$health_main
impact_rounded pop_fraction erf_ci exp bhd
2033 0.0661067 central 8.85 30747

Example: attribute_health() with AR

Refresher - Burden of disease with absolute risk

attribute_health() with AR

Goal: attribute cases of high annoyance (HA) to noise exposure

Source input data: NIPH
results_noise_ha <- attribute_health(
    approach_risk = "absolute_risk",
    exp_central = c(57.5, 62.5, 67.5, 72.5, 77.5),
    pop_exp = c(387500, 286000, 191800, 72200, 7700),
    erf_eq_central = "78.9270-3.1162*c+0.0342*c^2")

Main results

results_noise_ha$health_main
approach_risk exposure_dimension impact
absolute_risk 1, 2, 3, 4, 5 174231.8

Detailed results

results_noise_ha$health_detailed$results_raw
exposure_dimension exp pop_exp impact
1 57.5 387500 49674.594
2 62.5 286000 50788.595
3 67.5 191800 46813.105
4 72.5 72200 23657.232
5 77.5 7700 3298.314

Example: Iteration with attribute_health()

attribute_health() across multiple geographic units

Goal: attribute disease cases to PM2.5 exposure in multiple geographic units, such as municipalities, provinces, countries, …

results_iteration <- attribute_health(
    geo_id_disaggregated = c("Zurich", "Basel", "Geneva", "Ticino", "Valais"), 
    geo_id_aggregated = c("Ger","Ger","Fra","Ita","Fra"),
    rr_central = 1.369,
    rr_increment = 10, 
    cutoff_central = 5,
    erf_shape = "log_linear",
    exp_central = c(11, 11, 10, 8, 7),
    bhd_central = c(4000, 2500, 3000, 1500, 500)
)

Here the we want to aggregate results by language region ("Ger", "Fra", "Ita")

Main results

results_iteration$health_main
geo_id_aggregated impact_rounded erf_ci exp_ci bhd_ci
Fra 466 central central central
Ger 1116 central central central
Ita 135 central central central

Tip

The main output contains aggregated results if available, or disaggregated results if no aggregation ID was provided

Detailed results

results_iteration$health_detailed$results_raw
geo_id_disaggregated geo_id_aggregated impact_rounded
Zurich Ger 687
Basel Ger 429
Geneva Fra 436
Ticino Ita 135
Valais Fra 30

Example: summarize_uncertainty()

summarize_uncertainty()

You can do a Monte Carlo simulation and obtain summary confidence intervals via the summarize_uncertainty function

results_pm_copd <- 
  summarize_uncertainty(
    output_attribute = results_pm_copd,
    n_sim = 100
)

Main results

results_pm_copd$uncertainty_main
geo_id_disaggregated impact_ci impact impact_rounded
a central_estimate 3136.993 3137
a lower_estimate 1537.385 1537
a upper_estimate 5676.227 5676

Detailed results

results_pm_copd$uncertainty_detailed$attribute_by_geo_id_disaggregated
geo_id_disaggregated sim_id rr_central exp_central bhd_central impact
a 1 1.462496 10.169416 32127.59 5731.8496
a 2 1.521621 7.911264 31318.83 3602.7860
a 3 1.496932 8.774451 32812.33 4634.4746
a 4 1.236879 9.054176 30007.59 2477.9794
a 5 1.307063 9.020706 31257.61 3190.5823
a 6 1.356192 8.512348 31754.01 3222.6310
a 7 1.335157 9.418368 28834.70 3457.0933
a 8 1.205938 8.744307 31070.10 2103.8582
a 9 1.293466 8.644376 30822.27 2759.0918
a 10 1.369631 8.044059 29659.24 2708.1049
a 11 1.476130 9.283572 30688.80 4715.0812
a 12 1.266201 8.123483 32268.00 2293.2503
a 13 1.565692 9.435253 30564.39 5511.4549
a 14 1.220164 7.876042 30226.44 1681.2645
a 15 1.196227 8.373347 29645.66 1738.7378
a 16 1.285776 8.672201 30618.67 2699.7466
a 17 1.449824 8.667627 29662.75 3777.8193
a 18 1.322765 9.046383 31000.83 3317.5968
a 19 1.222993 9.448868 30176.27 2584.9900
a 20 1.414973 8.716984 31710.98 3838.4233
a 21 1.597893 9.638799 30756.55 6009.9256
a 22 1.448811 9.864133 31034.71 5121.0049
a 23 1.329628 8.382055 29591.60 2718.2256
a 24 1.279985 8.520498 30542.15 2542.1455
a 25 1.234510 9.037271 32682.35 2664.8586
a 26 1.143348 9.277425 31509.66 1754.7731
a 27 1.517077 8.941018 31152.00 4718.7539
a 28 1.608763 9.226419 31374.23 5711.6167
a 29 1.647204 8.661057 28534.14 4765.0622
a 30 1.434593 8.834073 29583.24 3822.7102
a 31 1.189432 8.774213 31791.97 2014.8474
a 32 1.523692 9.280948 32342.64 5335.5270
a 33 1.389938 8.162300 31633.04 3128.0141
a 34 1.539019 7.437381 29982.26 2990.8301
a 35 1.264264 9.618489 31191.94 3201.5640
a 36 1.244678 9.641836 30861.85 2981.5140
a 37 1.117177 9.518233 31236.91 1525.3514
a 38 1.144898 9.332677 30461.48 1734.5510
a 39 1.599173 8.624380 32339.76 5060.2016
a 40 1.592109 9.465788 30058.56 5637.1112
a 41 1.746363 8.229324 29502.68 4861.1082
a 42 1.293848 8.888864 31207.69 2975.0336
a 43 1.242423 9.565886 29482.27 2781.8211
a 44 1.186965 8.538280 31400.12 1847.6976
a 45 1.262943 8.848151 30021.75 2579.3537
a 46 1.493217 8.894856 31072.59 4492.3411
a 47 1.357960 8.623589 30839.80 3236.6449
a 48 1.293426 8.720863 30578.25 2791.6685
a 49 1.409966 8.048208 29688.17 2951.8561
a 50 1.567719 9.337891 30536.99 5411.1261
a 51 1.446675 8.702427 31268.44 3995.6233
a 52 1.399679 8.826942 30316.47 3660.5051
a 53 1.257943 9.117803 31757.71 2863.5050
a 54 1.357981 8.300835 29972.25 2879.4834
a 55 1.451873 10.009305 29159.00 4967.7855
a 56 1.340506 9.137586 30763.13 3512.7888
a 57 1.240475 8.876587 29806.86 2388.8413
a 58 1.498765 8.591182 29989.67 4056.0824
a 59 1.368704 9.493419 30390.03 3997.4683
a 60 1.414422 9.236187 31137.12 4253.3399
a 61 1.237385 8.963959 29726.87 2406.8757
a 62 1.287537 8.873243 31440.49 2931.8344
a 63 1.260693 9.421512 31316.64 3048.9348
a 64 1.078443 8.817682 30172.27 857.4647
a 65 1.373768 9.598045 30495.46 4142.9503
a 66 1.236879 9.452916 30447.90 2750.1255
a 67 1.318392 8.854116 30793.45 3111.8145
a 68 1.262880 9.158913 31903.06 2951.1791
a 69 1.471209 8.885705 31737.16 4421.3061
a 70 1.308333 9.261365 30199.23 3267.8943
a 71 1.356827 8.746336 29122.17 3145.9715
a 72 1.474773 8.590024 30608.95 3984.8055
a 73 1.435846 9.572380 31765.57 4842.7236
a 74 1.502303 8.985174 29217.65 4374.6331
a 75 1.460520 9.738521 28631.75 4704.3380
a 76 1.341438 8.341227 31089.41 2906.3434
a 77 1.549701 8.636472 28396.42 4181.6429
a 78 1.282869 8.752270 31122.64 2777.1801
a 79 1.253935 9.026258 31250.85 2721.3798
a 80 1.298591 9.138925 29620.38 3036.0783
a 81 1.483334 9.085931 30376.04 4519.8789
a 82 1.215117 9.081671 30732.38 2349.4118
a 83 1.178410 9.042366 31836.65 2044.1655
a 84 1.398355 8.905416 31769.13 3899.2131
a 85 1.452661 9.383542 30169.96 4555.2599
a 86 1.444415 8.486740 30931.49 3722.0012
a 87 1.323915 8.536976 29449.77 2782.3967
a 88 1.521840 9.204557 30948.65 5009.0326
a 89 1.151462 8.629601 31075.18 1550.6851
a 90 1.314995 9.476953 30568.30 3526.8738
a 91 1.243599 8.988530 30565.73 2545.5287
a 92 1.226581 8.776856 30709.30 2279.7038
a 93 1.394531 9.162430 29141.71 3767.1884
a 94 1.377354 8.523845 30078.43 3209.0504
a 95 1.181774 8.956203 31649.47 2023.6515
a 96 1.235014 9.633116 30443.77 2836.3514
a 97 1.101541 8.349209 30175.87 961.7481
a 98 1.596689 8.666183 31050.85 4894.9786
a 99 1.310017 7.882021 31433.46 2353.5735
a 100 1.383293 8.134663 31381.57 3034.8476

Example: compare() two scenarios

compare() two scenarios

  1. Use attribute_health() to calculate burden of scenarios A & B
scenario_A <- attribute_health(
  
    exp_central = 8.85,   # EXPOSURE 1
    
    cutoff_central = 5, 
    bhd_central = 25000,
    approach_risk = "relative_risk",
    erf_shape = "log_linear",
    rr_central = 1.118,
    rr_increment = 10)
scenario_B <- attribute_health(
  
    exp_central = 6,     # EXPOSURE 2
    
    cutoff_central = 5, 
    bhd_central = 25000,
    approach_risk = "relative_risk",
    erf_shape = "log_linear",
    rr_central = 1.118,
    rr_increment = 10)
  1. Use compare() to compare scenarios A & B
results_comparison <- compare(
  output_attribute_1 = scenario_A,
  output_attribute_2 = scenario_B,
  approach_comparison = "delta" # or "pif" (population impact fraction)
)

Comparison results

results_comparison$health_main
impact impact_rounded impact_1 impact_2 bhd exp_1 exp_2
773.5564 774 1050.86 277.304 25000 8.85 6

health_detailed contains

  • results_raw raw comparison results
  • scenario_1 results (scenario A in our case)
  • scenario_2 results (scenario B in our case)

Example: monetize() health impacts

monetize() health impacts

Different monetization pathways / options are available

  • Discounting yes/no
  • Inflation yes/no
  • Stand-alone use the function can either monetize a healthiar output or an “external” health impact
results_monetization <- 
  monetize(
    output_attribute = results_pm_copd,
    valuation = 20,
    discount_shape = "exponential",
    discount_rate = 0.03,
    discount_years = 5)

Main monetization results

results_monetization$monetization_main
impact monetized_impact discount_rate valuation monetized_impact_before_inflation_and_discount monetized_impact_after_inflation_and_discount
3501.962 60416.46 0.03 20 70039.24 60416.46

Other functions

  • attribute_lifetable() for YLL
  • attribute_health for YLD with (with the dw & duration arguments)
  • get_daly as the sum of YLL and YLD
  • cba() cost-benefit analysis
  • multiexpose() include multiple exposures (e.g. PM2.5 & NO2) in your assessment
  • prepare_exposure() combines spatial exposure data and spatial geographic units data to obtain (pop-weighted) mean exposure
  • socialize determines burden attributable to differences in a social indicator
    • E.g. share of health impacts due to living in a poor neighborhood (with higher exposure) instead of a rich neighborhood (with lower exposure)
  • attribute_mod() modify an existing healthiar assessment

More info

healthiar in RStudio 1/3

Landing page of the healthiar package in RStudio, where you find the package vignettes and function documentation.

healthiar in RStudio 2/3

Vignette = detailed guide to a package

Intro to healthiar vignette

healthiar in RStudio 3/3

Help page of attribute_health()

Any arguments without a “=” symbol after the name have no default and must be user-specified

Post-healthiar workflow

Export results

write.csv(x = results_pm_copd$health_main, file = "exported_results/results_pm_copd.csv")
save(results_pm_copd, file = "exported_results/results_pm_copd.Rdata")
openxlsx::write.xlsx(x = results_pm_copd$health_main, file = "exported_results/results_pm_copd.xlsx")

Exported to .xlsx format

Visualize results

Visualization is out of scope of healthiar. You can visualize in

Outlook

Outlook 1/2

  • healthiar will be publicly available by the end of the year
    • We can grant you access now already to the GitHub page if you want
    • healthiar might be expanded in the future (if funding available)
  • Python version coming out later in 2026
  • Two international workshops on 29 Sep & 1 Oct 2025 (see next slide)

Outlook 2/2

healthiar online workshops

29 September 2025

1 October 2025

Registration link

Please spread the word!

Q & A

Happy coding! : )